Criterion B Details

# Default ecosystem code for template development.
# This line is replaced by build_ecosystem_pages.py for each ecosystem.
ecosystem_code = 'Agroecosistema Platanero y Bananero'

Import Python modules.

import os
import yaml
from pathlib import Path
from lonboard import Map
from rle.core import Ecosystems, criterion_b_status, rle_category
from rle.core.eoo import make_eoo
from rle.core.aoo import make_aoo_grid

Load the country config file.

project_root = os.environ.get('PIXI_PROJECT_ROOT', str(Path('..').resolve()))
config_path = Path(project_root) / 'config' / 'country_config.yaml'
with open(config_path) as f:
    config = yaml.safe_load(f)

# Ecosystem index (the COG pixel value for this ecosystem), looked up by code
# from the canonical index table. Absent if the index has not been built yet.
import csv
ecosystem_index = None
index_csv = Path(project_root) / 'config' / 'ecosystems' / 'index.csv'
if index_csv.exists():
    with open(index_csv) as f:
        for row in csv.DictReader(f):
            if row['code'] == ecosystem_code:
                ecosystem_index = int(row['index'])
                break

Load & Filter Ecosystem Data

Load data for all the ecosystems.

import sys
# Shared config helpers live in scripts/; make them importable from here.
sys.path.insert(0, str(Path(project_root) / 'scripts'))
from _config import ensure_vector_source

source = config['ecosystem_source']
# ecosystem_code_column is optional: fall back to the name column.
ecosystem_column = source.get('ecosystem_code_column') or source.get('ecosystem_name_column')
# Prefer the ecosystem-sorted `optimized_data` copy when configured, so that
# filtering to one ecosystem uses parquet predicate pushdown instead of loading
# the whole national map into memory. Falls back to `data`.
ecosystems = Ecosystems.from_file(
    ensure_vector_source(source.get('optimized_data') or source['data']),
    ecosystem_column=ecosystem_column,
    ecosystem_name_column=source.get('ecosystem_name_column'),
    functional_group_column=source.get('functional_group_column')
)

Filter by the Agroecosistema Platanero y Bananero and check the number of features.

ecosystem = ecosystems.filter(ecosystem_code)
has_data = ecosystem.size() > 0
print(f'{ecosystem.size() = }')
if not has_data:
    from IPython.display import Markdown, display
    display(Markdown(
        f'**No spatial data found for {ecosystem_code}.** '
        f'Criterion B calculations are skipped.'
    ))
ecosystem.size() = 92

Extent of Occurrence (EOO) (subcriterion B1)

Extent of occurrence (EOO). The EOO of an ecosystem is the area (km2) of a minimum convex polygon – the smallest polygon in which no internal angle exceeds 180° that encompasses all known current spatial occurrences of the ecosystem type.

The minimum convex polygon (also known as a convex hull) must not exclude any areas, discontinuities or disjunctions, regardless of whether the ecosystem can occur in those areas or not. Regions such as oceans (for terrestrial ecosystems), land (for coastal or marine ecosystems), or areas outside the study area (such as in a different country) must remain included within the minimum convex polygon to ensure that this standardised method is comparable across ecosystem types. In addition, these features contribute to spreading risks across the distribution of the ecosystem by making different parts of its distribution more spatially independent.

Calculate EOO

Start by calculating the convex hull of the ecosystem’s distribution.

import geopandas as gpd

if has_data:
    ecosystem_geometry = ecosystem.geometry.union_all()
    gdf_ecosystem_polygons = gpd.GeoDataFrame(geometry=[ecosystem_geometry], crs=ecosystem.geometry.crs)
    hull = ecosystem_geometry.convex_hull
    gdf_hull = gpd.GeoDataFrame(geometry=[hull], crs=ecosystem.geometry.crs)

Display the ecosystem’s distribution and the convex hull.

from lonboard import Map, PolygonLayer
from rle.core.viz import smart_map

if has_data:
    eoo_hull = make_eoo(ecosystem).compute()
    display(smart_map([eoo_hull, ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(
if has_data:
    hull_ea = gdf_hull.to_crs("ESRI:54034")
    eoo = hull_ea.geometry.iloc[0].area / 1e6
    print(f'EOO is {eoo:.1f} km2')
EOO is 144007.5 km2

Then calculate the area of the convex hull polygon.

Direct calculation of EOO

EOO can also be calculated directly using …

if has_data:
    ecosystem.eoo

Verify that the area returned by calling make_eoo(ecosystem).compute().area_km2 is the same as the area of the convex hull polygon.

if has_data:
    assert ecosystem.eoo == eoo

Area of Occupancy (AOO) (subcriterion B2)

The protocol for this adjustment includes the following steps:

  1. Intersect AOO grid with the ecosystem’s distribution map.
  2. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
  3. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
  4. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
  5. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).

AOO Calculation Details

Intersect AOO grid and ecosystem map

  1. Intersect AOO grid with the ecosystem’s distribution map
from pathlib import Path
from rle.core.aoo import make_aoo_grid_cached

if has_data:
    # Prefer a prebuilt grid cache (e.g. a gs:// URI) so the national AOO grid
    # is not recomputed during CI renders — computing it from the full national
    # ecosystem map peaks at many GB of RAM. Fall back to a local cache when no
    # prebuilt cache is configured. Build one with `pixi run build-caches`.
    cache_path = (
        source.get('aoo_grid_cache_url')
        or (Path(project_root) / '.cache' / 'aoo_grid.parquet')
    )
    aoo_grid = make_aoo_grid_cached(ecosystems, cache_path=cache_path)
    aoo_grid_filtered = aoo_grid.filter_by_ecosystem(ecosystem_code)

Visualize variations in the AOO grid.

from matplotlib.colors import LinearSegmentedColormap
from lonboard.colormap import apply_continuous_cmap
from rle.core.aoo import slugify_ecosystem_name

ecosystem_column = slugify_ecosystem_name(ecosystem_code)
if has_data:
    cmap = LinearSegmentedColormap.from_list("white_red", ["white", "red"])
    values = aoo_grid_filtered.grid_cells[ecosystem_column].values
    normalized = (values - values.min()) / (values.max() - values.min())
    colors = apply_continuous_cmap(normalized, cmap)
    display(smart_map([(aoo_grid_filtered, {"get_fill_color": colors}), ecosystem]))
/home/runner/work/rle-tyler-colombia/rle-tyler-colombia/.pixi/envs/default/lib/python3.11/site-packages/lonboard/_geoarrow/ops/reproject.py:116: UserWarning: Input being reprojected to EPSG:4326 CRS.
Lonboard is only able to render data in EPSG:4326 projection.
  warnings.warn(

Calculate grid cell area and total area

  1. Calculate extent of the ecosystem type in each grid cell (area) and sum these areas to obtain the total ecosystem area (total area).
if has_data:
    keep = ['geometry', 'grid_col', 'grid_row', ecosystem_column]
    gdf = aoo_grid_filtered.grid_cells[keep]
    display(gdf)
geometry grid_col grid_row Agroecosistema_Platanero_y_Bananero
0 POLYGON ((-76.71613 7.98358, -76.71613 8.07488... -855 88 0.005094
1 POLYGON ((-76.71613 8.07488, -76.71613 8.16621... -855 89 0.003619
2 POLYGON ((-76.62629 7.52733, -76.62629 7.61854... -854 83 0.012775
3 POLYGON ((-76.62629 7.61854, -76.62629 7.70977... -854 84 0.065699
4 POLYGON ((-76.62629 7.70977, -76.62629 7.80102... -854 85 0.057034
5 POLYGON ((-76.62629 7.80102, -76.62629 7.89229... -854 86 0.246817
6 POLYGON ((-76.62629 7.89229, -76.62629 7.98358... -854 87 0.014714
7 POLYGON ((-76.62629 7.98358, -76.62629 8.07488... -854 88 0.284478
8 POLYGON ((-76.62629 8.07488, -76.62629 8.16621... -854 89 0.014531
9 POLYGON ((-76.62629 8.25756, -76.62629 8.34893... -854 91 0.001174
10 POLYGON ((-76.62629 8.62317, -76.62629 8.71462... -854 95 0.040853
11 POLYGON ((-76.62629 8.71462, -76.62629 8.8061,... -854 96 0.000856
12 POLYGON ((-76.53646 7.80102, -76.53646 7.89229... -853 86 0.051403
13 POLYGON ((-76.53646 7.89229, -76.53646 7.98358... -853 87 0.113540
14 POLYGON ((-76.53646 7.98358, -76.53646 8.07488... -853 88 0.002424
15 POLYGON ((-76.53646 8.16621, -76.53646 8.25756... -853 90 0.010637
16 POLYGON ((-76.53646 8.25756, -76.53646 8.34893... -853 91 0.004750
17 POLYGON ((-76.53646 8.71462, -76.53646 8.8061,... -853 96 0.017359
18 POLYGON ((-76.17714 9.17222, -76.17714 9.26381... -849 101 0.001939
19 POLYGON ((-76.0873 8.89759, -76.0873 8.98911, ... -848 98 0.020939
20 POLYGON ((-76.0873 9.08066, -76.0873 9.17222, ... -848 100 0.054253
21 POLYGON ((-76.0873 9.17222, -76.0873 9.26381, ... -848 101 0.131866
22 POLYGON ((-75.99747 9.08066, -75.99747 9.17222... -847 100 0.063110
23 POLYGON ((-75.99747 9.17222, -75.99747 9.26381... -847 101 0.002818
24 POLYGON ((-75.81781 4.43572, -75.81781 4.52643... -845 49 0.005690
25 POLYGON ((-75.72798 4.43572, -75.72798 4.52643... -844 49 0.009511
26 POLYGON ((-75.45848 9.35542, -75.45848 9.44706... -841 103 0.002682
27 POLYGON ((-75.45848 9.44706, -75.45848 9.53872... -841 104 0.000481
28 POLYGON ((-74.20084 10.45667, -74.20084 10.548... -827 115 0.009199
29 POLYGON ((-74.20084 10.54861, -74.20084 10.640... -827 116 0.000412
30 POLYGON ((-74.20084 10.73256, -74.20084 10.824... -827 118 0.017339
31 POLYGON ((-74.20084 10.82458, -74.20084 10.916... -827 119 0.116684
32 POLYGON ((-74.20084 10.91663, -74.20084 11.008... -827 120 0.072097
33 POLYGON ((-74.11101 10.45667, -74.11101 10.548... -826 115 0.005560
34 POLYGON ((-74.11101 10.54861, -74.11101 10.640... -826 116 0.004766
35 POLYGON ((-74.11101 10.64057, -74.11101 10.732... -826 117 0.012084
36 POLYGON ((-74.11101 10.73256, -74.11101 10.824... -826 118 0.382028
37 POLYGON ((-74.11101 10.82458, -74.11101 10.916... -826 119 0.442224
38 POLYGON ((-74.11101 10.91663, -74.11101 11.008... -826 120 0.242610
39 POLYGON ((-74.02118 10.73256, -74.02118 10.824... -825 118 0.026321
40 POLYGON ((-73.75168 8.53173, -73.75168 8.62317... -822 94 0.000428
41 POLYGON ((-73.66185 8.53173, -73.66185 8.62317... -821 94 0.009348
42 POLYGON ((-73.57202 11.19293, -73.57202 11.285... -820 123 0.001818
43 POLYGON ((-73.48219 11.19293, -73.48219 11.285... -819 123 0.005016
44 POLYGON ((-73.2127 11.19293, -73.2127 11.28509... -816 123 0.009227
45 POLYGON ((-73.12286 11.19293, -73.12286 11.285... -815 123 0.119841
46 POLYGON ((-73.12286 11.28509, -73.12286 11.377... -815 124 0.073538
47 POLYGON ((-73.03303 11.19293, -73.03303 11.285... -814 123 0.006589

The column Agroecosistema_Platanero_y_Bananero contains the (fractional) area of the ecosystem in each grid cell.

Sum up the areas of each grid cell to get the total area.

if has_data:
    total_area = gdf[ecosystem_column].sum()
    display(total_area)
np.float64(2.798175661935643)

Calculate cumulative area

  1. Arrange grid cells in ascending order based on their area (smaller first). Calculate accumulated sum of area per cell (cumulative area).
if has_data:
    gdf = gdf.sort_values(by=ecosystem_column)
    gdf["cumulative_area"] = gdf[ecosystem_column].cumsum()
    display(gdf)
geometry grid_col grid_row Agroecosistema_Platanero_y_Bananero cumulative_area
29 POLYGON ((-74.20084 10.54861, -74.20084 10.640... -827 116 0.000412 0.000412
40 POLYGON ((-73.75168 8.53173, -73.75168 8.62317... -822 94 0.000428 0.000840
27 POLYGON ((-75.45848 9.44706, -75.45848 9.53872... -841 104 0.000481 0.001321
11 POLYGON ((-76.62629 8.71462, -76.62629 8.8061,... -854 96 0.000856 0.002177
9 POLYGON ((-76.62629 8.25756, -76.62629 8.34893... -854 91 0.001174 0.003351
42 POLYGON ((-73.57202 11.19293, -73.57202 11.285... -820 123 0.001818 0.005169
18 POLYGON ((-76.17714 9.17222, -76.17714 9.26381... -849 101 0.001939 0.007107
14 POLYGON ((-76.53646 7.98358, -76.53646 8.07488... -853 88 0.002424 0.009531
26 POLYGON ((-75.45848 9.35542, -75.45848 9.44706... -841 103 0.002682 0.012213
23 POLYGON ((-75.99747 9.17222, -75.99747 9.26381... -847 101 0.002818 0.015032
1 POLYGON ((-76.71613 8.07488, -76.71613 8.16621... -855 89 0.003619 0.018651
16 POLYGON ((-76.53646 8.25756, -76.53646 8.34893... -853 91 0.004750 0.023401
34 POLYGON ((-74.11101 10.54861, -74.11101 10.640... -826 116 0.004766 0.028167
43 POLYGON ((-73.48219 11.19293, -73.48219 11.285... -819 123 0.005016 0.033183
0 POLYGON ((-76.71613 7.98358, -76.71613 8.07488... -855 88 0.005094 0.038277
33 POLYGON ((-74.11101 10.45667, -74.11101 10.548... -826 115 0.005560 0.043838
24 POLYGON ((-75.81781 4.43572, -75.81781 4.52643... -845 49 0.005690 0.049528
47 POLYGON ((-73.03303 11.19293, -73.03303 11.285... -814 123 0.006589 0.056118
28 POLYGON ((-74.20084 10.45667, -74.20084 10.548... -827 115 0.009199 0.065316
44 POLYGON ((-73.2127 11.19293, -73.2127 11.28509... -816 123 0.009227 0.074544
41 POLYGON ((-73.66185 8.53173, -73.66185 8.62317... -821 94 0.009348 0.083892
25 POLYGON ((-75.72798 4.43572, -75.72798 4.52643... -844 49 0.009511 0.093403
15 POLYGON ((-76.53646 8.16621, -76.53646 8.25756... -853 90 0.010637 0.104040
35 POLYGON ((-74.11101 10.64057, -74.11101 10.732... -826 117 0.012084 0.116123
2 POLYGON ((-76.62629 7.52733, -76.62629 7.61854... -854 83 0.012775 0.128899
8 POLYGON ((-76.62629 8.07488, -76.62629 8.16621... -854 89 0.014531 0.143430
6 POLYGON ((-76.62629 7.89229, -76.62629 7.98358... -854 87 0.014714 0.158144
30 POLYGON ((-74.20084 10.73256, -74.20084 10.824... -827 118 0.017339 0.175483
17 POLYGON ((-76.53646 8.71462, -76.53646 8.8061,... -853 96 0.017359 0.192842
19 POLYGON ((-76.0873 8.89759, -76.0873 8.98911, ... -848 98 0.020939 0.213781
39 POLYGON ((-74.02118 10.73256, -74.02118 10.824... -825 118 0.026321 0.240102
10 POLYGON ((-76.62629 8.62317, -76.62629 8.71462... -854 95 0.040853 0.280955
12 POLYGON ((-76.53646 7.80102, -76.53646 7.89229... -853 86 0.051403 0.332358
20 POLYGON ((-76.0873 9.08066, -76.0873 9.17222, ... -848 100 0.054253 0.386611
4 POLYGON ((-76.62629 7.70977, -76.62629 7.80102... -854 85 0.057034 0.443644
22 POLYGON ((-75.99747 9.08066, -75.99747 9.17222... -847 100 0.063110 0.506754
3 POLYGON ((-76.62629 7.61854, -76.62629 7.70977... -854 84 0.065699 0.572453
32 POLYGON ((-74.20084 10.91663, -74.20084 11.008... -827 120 0.072097 0.644550
46 POLYGON ((-73.12286 11.28509, -73.12286 11.377... -815 124 0.073538 0.718088
13 POLYGON ((-76.53646 7.89229, -76.53646 7.98358... -853 87 0.113540 0.831627
31 POLYGON ((-74.20084 10.82458, -74.20084 10.916... -827 119 0.116684 0.948311
45 POLYGON ((-73.12286 11.19293, -73.12286 11.285... -815 123 0.119841 1.068152
21 POLYGON ((-76.0873 9.17222, -76.0873 9.26381, ... -848 101 0.131866 1.200018
38 POLYGON ((-74.11101 10.91663, -74.11101 11.008... -826 120 0.242610 1.442628
5 POLYGON ((-76.62629 7.80102, -76.62629 7.89229... -854 86 0.246817 1.689445
7 POLYGON ((-76.62629 7.98358, -76.62629 8.07488... -854 88 0.284478 1.973923
36 POLYGON ((-74.11101 10.73256, -74.11101 10.824... -826 118 0.382028 2.355951
37 POLYGON ((-74.11101 10.82458, -74.11101 10.916... -826 119 0.442224 2.798176

Calculate cumulative proportion

  1. Calculate cumulative proportion by dividing cumulative area by total area (cumulative proportion takes values between 0 and 1)
if has_data:
    gdf["cumulative_proportion"] = gdf["cumulative_area"] / total_area
    display(gdf)
geometry grid_col grid_row Agroecosistema_Platanero_y_Bananero cumulative_area cumulative_proportion
29 POLYGON ((-74.20084 10.54861, -74.20084 10.640... -827 116 0.000412 0.000412 0.000147
40 POLYGON ((-73.75168 8.53173, -73.75168 8.62317... -822 94 0.000428 0.000840 0.000300
27 POLYGON ((-75.45848 9.44706, -75.45848 9.53872... -841 104 0.000481 0.001321 0.000472
11 POLYGON ((-76.62629 8.71462, -76.62629 8.8061,... -854 96 0.000856 0.002177 0.000778
9 POLYGON ((-76.62629 8.25756, -76.62629 8.34893... -854 91 0.001174 0.003351 0.001198
42 POLYGON ((-73.57202 11.19293, -73.57202 11.285... -820 123 0.001818 0.005169 0.001847
18 POLYGON ((-76.17714 9.17222, -76.17714 9.26381... -849 101 0.001939 0.007107 0.002540
14 POLYGON ((-76.53646 7.98358, -76.53646 8.07488... -853 88 0.002424 0.009531 0.003406
26 POLYGON ((-75.45848 9.35542, -75.45848 9.44706... -841 103 0.002682 0.012213 0.004365
23 POLYGON ((-75.99747 9.17222, -75.99747 9.26381... -847 101 0.002818 0.015032 0.005372
1 POLYGON ((-76.71613 8.07488, -76.71613 8.16621... -855 89 0.003619 0.018651 0.006665
16 POLYGON ((-76.53646 8.25756, -76.53646 8.34893... -853 91 0.004750 0.023401 0.008363
34 POLYGON ((-74.11101 10.54861, -74.11101 10.640... -826 116 0.004766 0.028167 0.010066
43 POLYGON ((-73.48219 11.19293, -73.48219 11.285... -819 123 0.005016 0.033183 0.011859
0 POLYGON ((-76.71613 7.98358, -76.71613 8.07488... -855 88 0.005094 0.038277 0.013679
33 POLYGON ((-74.11101 10.45667, -74.11101 10.548... -826 115 0.005560 0.043838 0.015667
24 POLYGON ((-75.81781 4.43572, -75.81781 4.52643... -845 49 0.005690 0.049528 0.017700
47 POLYGON ((-73.03303 11.19293, -73.03303 11.285... -814 123 0.006589 0.056118 0.020055
28 POLYGON ((-74.20084 10.45667, -74.20084 10.548... -827 115 0.009199 0.065316 0.023343
44 POLYGON ((-73.2127 11.19293, -73.2127 11.28509... -816 123 0.009227 0.074544 0.026640
41 POLYGON ((-73.66185 8.53173, -73.66185 8.62317... -821 94 0.009348 0.083892 0.029981
25 POLYGON ((-75.72798 4.43572, -75.72798 4.52643... -844 49 0.009511 0.093403 0.033380
15 POLYGON ((-76.53646 8.16621, -76.53646 8.25756... -853 90 0.010637 0.104040 0.037181
35 POLYGON ((-74.11101 10.64057, -74.11101 10.732... -826 117 0.012084 0.116123 0.041500
2 POLYGON ((-76.62629 7.52733, -76.62629 7.61854... -854 83 0.012775 0.128899 0.046065
8 POLYGON ((-76.62629 8.07488, -76.62629 8.16621... -854 89 0.014531 0.143430 0.051258
6 POLYGON ((-76.62629 7.89229, -76.62629 7.98358... -854 87 0.014714 0.158144 0.056517
30 POLYGON ((-74.20084 10.73256, -74.20084 10.824... -827 118 0.017339 0.175483 0.062713
17 POLYGON ((-76.53646 8.71462, -76.53646 8.8061,... -853 96 0.017359 0.192842 0.068917
19 POLYGON ((-76.0873 8.89759, -76.0873 8.98911, ... -848 98 0.020939 0.213781 0.076400
39 POLYGON ((-74.02118 10.73256, -74.02118 10.824... -825 118 0.026321 0.240102 0.085807
10 POLYGON ((-76.62629 8.62317, -76.62629 8.71462... -854 95 0.040853 0.280955 0.100407
12 POLYGON ((-76.53646 7.80102, -76.53646 7.89229... -853 86 0.051403 0.332358 0.118777
20 POLYGON ((-76.0873 9.08066, -76.0873 9.17222, ... -848 100 0.054253 0.386611 0.138165
4 POLYGON ((-76.62629 7.70977, -76.62629 7.80102... -854 85 0.057034 0.443644 0.158548
22 POLYGON ((-75.99747 9.08066, -75.99747 9.17222... -847 100 0.063110 0.506754 0.181102
3 POLYGON ((-76.62629 7.61854, -76.62629 7.70977... -854 84 0.065699 0.572453 0.204581
32 POLYGON ((-74.20084 10.91663, -74.20084 11.008... -827 120 0.072097 0.644550 0.230346
46 POLYGON ((-73.12286 11.28509, -73.12286 11.377... -815 124 0.073538 0.718088 0.256627
13 POLYGON ((-76.53646 7.89229, -76.53646 7.98358... -853 87 0.113540 0.831627 0.297203
31 POLYGON ((-74.20084 10.82458, -74.20084 10.916... -827 119 0.116684 0.948311 0.338903
45 POLYGON ((-73.12286 11.19293, -73.12286 11.285... -815 123 0.119841 1.068152 0.381731
21 POLYGON ((-76.0873 9.17222, -76.0873 9.26381, ... -848 101 0.131866 1.200018 0.428857
38 POLYGON ((-74.11101 10.91663, -74.11101 11.008... -826 120 0.242610 1.442628 0.515560
5 POLYGON ((-76.62629 7.80102, -76.62629 7.89229... -854 86 0.246817 1.689445 0.603767
7 POLYGON ((-76.62629 7.98358, -76.62629 8.07488... -854 88 0.284478 1.973923 0.705432
36 POLYGON ((-74.11101 10.73256, -74.11101 10.824... -826 118 0.382028 2.355951 0.841960
37 POLYGON ((-74.11101 10.82458, -74.11101 10.916... -826 119 0.442224 2.798176 1.000000

Count AOO cells

  1. Calculate AOO by counting the number of cells with a cumulative proportion greater than 0.01 (i.e. exclude cells that in combination account for up to 1% of the total mapped extent of the ecosystem type).
if has_data:
    aoo = len(gdf[gdf["cumulative_proportion"] > 0.01])
    print(f'AOO is {aoo} cells')
AOO is 36 cells

AOO Calculation (direct call)

if has_data:
    aoo_count = ecosystem.aoo
    print(f'AOO: {aoo_count} grid cells')
AOO: 36 grid cells

Criterion B Summary

Criterion B status (spatial)
Vulnerable (VU) — Agroecosistema Platanero y Bananero (Agroecosistema Platanero y Bananero), index 14

Status reflects the spatial thresholds for EOO (B1) and AOO (B2) only. A final listing under B1/B2 additionally requires at least one of: (a) an observed or inferred continuing decline; (b) threatening processes likely to cause continuing decline within 20 years; or (c) few threat-defined locations — none of which are derived from the spatial metrics.

Sub-criterion Metric Value Category
B1 EOO 144007 km² Least Concern (LC)
B2 AOO 36 cells Vulnerable (VU)
Overall B — — Vulnerable (VU)